<template>
	<div class="person">
		<h2>人员信息</h2>
		<h3>姓名：{{name}}</h3>
		<h3>年龄：{{age}}</h3>
		<button @click="showPersonInfo">点我提示信息</button>
	</div>
</template>

<script>
	let a
	export default {
		name:'Person',
		data() {
			return {
				name:'张三',
				age:18
			}
		},
		methods: {
			showPersonInfo(){
				alert(this.name+this.age)
			}
		},
	}
</script>

<style>
	.person{
		background-color: skyblue;
		padding: 20px;
	}
</style>